package day0519;

public class Test6 {
    public static void main(String[] args) {
        /*String account="admin";
        String pwd="12345";
        String result=  account.equals("admin")&&pwd.equals("123456")?"登录成功" :"登录失败";//用三目运算符判断 account是否等于"admin"
        // 并且pwd是否等于"123456"
        //满足就打印登录成功， 否则打印登录失败。
        System.out.println(result);*/

        System.out.println(2&3);
        System.out.println(4|7);
        System.out.println(~6);//-7
        System.out.println(2^3);//1
        System.out.println(0x2^0x3);//1
        System.out.println(0b0010^0b0011);//1


        int a=7;
        int b=3;
        a= a^b;
        b= a^b;
        a= a^b;
        System.out.println(a);//3
        System.out.println(b);//7

        System.out.println(7<<2);

        System.out.println(7>>>2);
    }
}
